using System;
using System.Collections;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
using Microsoft.Xna.Framework.Content;


namespace GameEngine.Shaders
{
    public class GEShaderManager
    {
        private static Hashtable shaders = new Hashtable();

        public static void AddShader(string name, GEShader shader)
        {
            if(name != "")
                shaders.Add(name, shader);
        }

        public static GEShader GetShader(string name)
        {
            if (name != "" && shaders.ContainsKey(name))
                return shaders[name] as GEShader;
            else return null;
        }

        public static void LoadContent(ContentManager content)
        {
            foreach (GEShader shader in shaders.Values)
            {
                shader.LoadContent(content);
            }
        }
    }
}
